﻿namespace Microsoft.AspNetCore.App
{
    /// <summary>
    /// 表示一个终结点
    /// </summary>
    public class Endpoint
    {
        public string Pattern { get; set; }

        public RequestDelegate RequestDelegate { get; }

        public IReadOnlyList<string> AllowMethods { get; }

        public Endpoint(string pattern, RequestDelegate requestDelegate, IReadOnlyList<string> httpMethods)
        {
            Pattern = pattern;
            AllowMethods = httpMethods;
            RequestDelegate = requestDelegate;
        }
    }
}
